package com.example.elm_server_api;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;


@SpringBootApplication
@MapperScan(basePackages = {"com.example.elm_server_api.mapper"})
public class ElmServerApiApplication {

    public static void main(String[] args) {

        SpringApplication.run(ElmServerApiApplication.class, args);
    }

    // 声明容器中的 Bean
    @Bean
    public PasswordEncoder passwordEncoder(){
        return PasswordEncoderFactories.createDelegatingPasswordEncoder();
    }



}
